package com.dst;

import com.auth0.jwt.interfaces.Claim;
import com.auth0.jwt.interfaces.DecodedJWT;
import com.dst.utli.JwtUtils;
import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

public class test {
  @Test
  public void hh(){
    Map<String, String> map = new HashMap<>();
    map.put("name","zhangsan");
    String token = JwtUtils.getToken(map);
    System.out.println(token);
  }
  @Test
  public void hh1(){
    DecodedJWT verify = JwtUtils.verify("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiemhhbmdzYW4iLCJleHAiOjE2NTE1NzkyOTd9.ReqMbh4p6fKiH_2McYG-PxBAvqCE4cr93QJEps_lFDA");
    String name = verify.getClaim("name").asString();
    System.out.println(name);
  }
}
